Skip to content

Conversation

@afs
Copy link
Member

@afs afs commented Apr 19, 2016

JENA-1165 : Support for handlign undefined prefixes, especially in command line tools.

The default setting everywhere is "off".


// These two must be in-step.
/** Function applied to undefined prefixes to convert to a URI string */
public static final Function<String,String> fixupPrefixes = (x) -> "::"+x ;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be

private static final String URI_SKELETON = "::";
...
public static final Function<String,String> fixupPrefixes = URI_SKELETON::concat;

I find that clearer, because it names the string, but then, my tastes are odd.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm probably missing something here, but it seems like this is only ever used unwrapped, via fixupPrefixes.apply, and that's down below in this class (where it is used instead of using fixupPrefixIRI(String), but I'm not sure why). Maybe it would be clearer to have an ordinary method and in future, if a function is needed, to use a method reference?

@asfgit asfgit merged commit 20703b0 into apache:master Apr 21, 2016
asfgit pushed a commit that referenced this pull request Apr 21, 2016
@afs afs deleted the unset-prefixes branch April 22, 2016 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants